package com.cx.controller;

import com.cx.dao.entity.Message;
import com.cx.dao.mapper.MessageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;


/**
 * @Author cenxi
 * @Date 2023/9/26 16:30
 * @Version 1.0
 */
@RequestMapping("/msg")
@RestController
public class MessageController {

    @Autowired
    private MessageMapper messageMapper;


    @GetMapping("/list")
    public Object list() {
        List<Message> messages = messageMapper.selectList(null);
        return messages;
    }
}
